import request from '@/util/request'

export function bookList(bookBo) {
  return request({
    url: '/book/list',
    method: 'post',
    data: bookBo!=null?bookBo:{}
  })
}

export function adminBookList(bookBo) {
  return request({
    url: '/admin/book/list',
    method: 'post',
    data: bookBo!=null?bookBo:{}
  })
}

export function addBook(bookBo) {
  return request({
    url: '/book/add',
    method: 'post',
    data: bookBo
  })
}

export function updateBook(bookBo) {
  return request({
    url: '/book/update',
    method: 'post',
    data: bookBo
  })
}

export function deleteBook(bookId) {
  return request({
    url: '/book/delete/'+bookId,
    method: 'get',
  })
}

export function copyBook(bookBo) {
  return request({
    url: '/book/copy',
    method: 'post',
    data: bookBo!=null?bookBo:{}
  })
}

export function defaultBookList(bookBo) {
  return request({
    url: '/book/default/list',
    method: 'post',
    data: bookBo!=null?bookBo:{}
  })
}